//
//  BaseViewController.m
//  MyProject
//
//  Created by dllo on 15/10/28.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController


- (void)dealloc
{
    [[NSNotificationCenter defaultCenter]removeObserver:self];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
    [center addObserver:self selector:@selector(recevive:) name:@"cahnge" object:nil];
    
 }

//- (void)recevive:(NSNotification *)noti
//{
//    if (![[NSUserDefaults standardUserDefaults]boolForKey:@"isWhite"]) {
//        
//        self.view.backgroundColor = [UIColor blackColor];
//        self.myview.backgroundColor = [UIColor blackColor];
//        self.lable.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.tableView.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.collection.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.imageview.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.lable.textColor = [UIColor whiteColor];
//    }
//    else{
//        self.view.backgroundColor = [UIColor whiteColor];
//        self.myview.backgroundColor = [UIColor whiteColor];
//        self.lable.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.tableView.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.collection.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.imageview.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.lable.textColor = [UIColor blackColor];
//    }
//}

//- (void)viewDidLayoutSubviews
//{
//    if (![[NSUserDefaults standardUserDefaults]boolForKey:@"isWhite"]) {
//        
//        self.view.backgroundColor = [UIColor blackColor];
//        self.myview.backgroundColor = [UIColor blackColor];
//        self.lable.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.tableView.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.collection.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.imageview.backgroundColor = self.myview.backgroundColor = [UIColor blackColor];
//        self.lable.textColor = [UIColor whiteColor];
//    }
//    else{
//        self.view.backgroundColor = [UIColor whiteColor];
//        self.myview.backgroundColor = [UIColor whiteColor];
//        self.lable.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.tableView.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.collection.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.imageview.backgroundColor = self.myview.backgroundColor = [UIColor whiteColor];
//        self.lable.textColor = [UIColor blackColor];
//    }
//}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
